package com.jungle.bfi.service.voucher.impl;

import com.jungle.base.domain.bo.BaseUserBo;
import com.jungle.base.service.AbstractService;
import com.jungle.bfi.domain.bo.VoucherEntryTemplateBo;
import com.jungle.bfi.entity.VoucherEntryTemplatePo;
import com.jungle.bfi.service.voucher.VoucherEntryTemplateService;
import org.n3r.idworker.Sid;
import org.springframework.stereotype.Service;

/**
 * [voucher]凭证分录模板实体类
 * @author jungle
 * @since 2025-02-19 08:18:02
 */
@Service
public class VoucherEntryTemplateServiceImpl extends AbstractService<VoucherEntryTemplatePo, VoucherEntryTemplateBo, String> implements VoucherEntryTemplateService {

    @Override
    protected String getBoId(VoucherEntryTemplateBo bo) {
        return bo.getId();
    }

    @Override
    protected String newPoId() {
        return Sid.nextShort();
    }

    @Override
    protected VoucherEntryTemplatePo createPo(VoucherEntryTemplateBo bo, BaseUserBo userBo) {
        return mapper.map(bo, VoucherEntryTemplatePo.class);
    }
}
